Skip to content

docs(skill): add Canvas recipe, document name collision workaround#292

Merged
codemonkeychris merged 2 commits into
mainfrom
fix/canvas-collision
May 15, 2026
Merged

docs(skill): add Canvas recipe, document name collision workaround#292
codemonkeychris merged 2 commits into
mainfrom
fix/canvas-collision

Conversation

@sundaramramaswamy
Copy link
Copy Markdown
Collaborator

@sundaramramaswamy sundaramramaswamy commented May 14, 2026

The Canvas() factory from using static Factories shadows Microsoft.UI.Xaml.Controls.Canvas, making Canvas.SetLeft() inaccessible. Paint-app scored 13/100 (0/10 requirements) because of this.

The correct Reactor pattern is .Canvas(left, top) fluent modifier — no need for the static WinUI methods. Added complete Canvas recipe documenting this.

Changes:

  • Warning about the name collision and NOT using Canvas.SetLeft()
  • Complete recipe: .Canvas(left, top), .CenterAt(x, y), shapes
  • Key points about record properties and available shape factories

Fixes #282

The Canvas() factory shadows Canvas.SetLeft(). Document the
correct Reactor pattern: use .Canvas(left, top) fluent modifier
instead. Add complete Canvas recipe with positioning examples.

Fixes #282

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@codemonkeychris codemonkeychris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be in "getting started"... we have a model for separate recipes

Create canvas-positioning.cs recipe in reactor-recipes and
remove inline Canvas section from getting-started SKILL.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sundaramramaswamy
Copy link
Copy Markdown
Collaborator Author

Addressed — moved the Canvas recipe out of getting-started into a new reactor-recipes/references/canvas-positioning.cs recipe file. Updated the recipe index and SKILL.md intent table.

@codemonkeychris codemonkeychris merged commit 62a3ce0 into main May 15, 2026
8 checks passed
@codemonkeychris codemonkeychris deleted the fix/canvas-collision branch May 15, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Canvas factory name collision with using static Factories

2 participants